﻿<fundamentals:OfficeWindow x:Class="Daytimer.WikiQuoteHelper.DisambiguationWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:fundamentals="clr-namespace:Daytimer.Fundamentals;assembly=Daytimer.Fundamentals"
		xmlns:libcollectors="clr-namespace:WikiquoteScreensaverLib.IO.WebIO" Title="Topic Disambiguation" Height="300"
		Width="500" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
	<Grid Margin="20">
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<TextBlock x:Name="title" IsHitTestVisible="False" TextWrapping="Wrap" Grid.ColumnSpan="3"
				Text="The topic you requested is a little ambiguous. Choose one of the topics listed below." />
		<ListBox x:Name="listBox" Grid.Row="1" BorderThickness="0" Margin="0,10" Grid.ColumnSpan="3"
				ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
			<ListBox.ItemTemplate>
				<DataTemplate DataType="libcollectors:TopicChoice">
					<StackPanel Orientation="Vertical" IsHitTestVisible="False">
						<TextBlock Text="{Binding TopicName}" TextWrapping="Wrap" FontSize="14" />
						<TextBlock x:Name="descrip" Text="{Binding TopicDescription}" TextWrapping="Wrap"
								Margin="0,5,0,0" />
					</StackPanel>
					<DataTemplate.Triggers>
						<DataTrigger Binding="{Binding TopicDescription}" Value="">
							<Setter Property="Visibility" TargetName="descrip" Value="Collapsed" />
						</DataTrigger>
						<DataTrigger Binding="{Binding TopicDescription}" Value="{x:Null}">
							<Setter Property="Visibility" TargetName="descrip" Value="Collapsed" />
						</DataTrigger>
					</DataTemplate.Triggers>
				</DataTemplate>
			</ListBox.ItemTemplate>
			<ListBox.Resources>
				<Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}">
					<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick" />
					<EventSetter Event="Selected" Handler="ListBoxItem_Selected" />
				</Style>
			</ListBox.Resources>
		</ListBox>
		<Button x:Name="okButton" Grid.Row="2" Grid.Column="1" Content="_OK" Width="75" Height="25" Margin="0,0,10,0"
				IsDefault="True" IsEnabled="False" Click="okButton_Click" />
		<Button Grid.Row="2" Grid.Column="2" Content="_Cancel" Width="75" Height="25" IsCancel="True" />
	</Grid>
</fundamentals:OfficeWindow>
